package cn.kgc.service.desktop;

import cn.kgc.pojo.Dict;
import cn.kgc.pojo.Schedule;
import org.apache.ibatis.annotations.Param;

import java.sql.Date;
import java.util.List;


public interface ScheduleDaoService {
    List<Schedule> queryAllAffairs(@Param("keyword") String keyword,
                                   @Param("dateStart") Date dateStart,
                                   @Param("dateEnd") Date dateEnd,
                                   @Param("contact") String contact,
                                   @Param("type") String type,
                                   @Param("location") String location,
                                   @Param("currentPage") Integer currentPage,
                                   @Param("pageSize") Integer pageSize,
                                   @Param("userId") int userId);

    int queryAffairsCount(@Param("keyword") String keyword,
                          @Param("dateStart") Date dateStart,
                          @Param("dateEnd") Date dateEnd,
                          @Param("contact") String contact,
                          @Param("type") String type,
                          @Param("location") String location,
                          @Param("userId") int userId);

    boolean addData(Schedule schedule);

    boolean deleteData(@Param("id") int id);

    Schedule queryUpdatedTarget(@Param("id") int id);

    boolean updateData(@Param("id") int id, Schedule schedule);

    List<String> queryAllDateFromAffairs(@Param("id") int id);

    List<Schedule> QueryAllData(@Param("keyword") String keyword);

    /*Dict*/
    List<String> queryAllTypeInfo();

    List<String> queryAllLocationInfo();

    /*User*/
    List<String> queryAllContact();

    /*Dict*/
    List<Dict> queryAllDict();

    /*Duration*/
    List<String> queryDuration();

    /*Leave travel request */
    List<Schedule> queryLeaveRequest(@Param("id") Integer id);

    int queryLeaveRequestCount(@Param("id") Integer id);

    int queryLeaveApplyCount(@Param("id") Integer id);
}
